#!/bin/sh

commitId=$(git rev-parse --short HEAD)
DATE_STR=$(date '+%y%m%d-%H%M')-${commitId}
APP_NAME=platform-front
IMAGE_TAG=${APP_NAME}:${DATE_STR}

echo $IMAGE_TAG

rm -rf build

yarn build

cp ./nginx-web.conf ./build

docker build -f ./Dockerfile -t ${IMAGE_TAG} ./build

#docker run -d -p 8084:80 --name platform-front 镜像id
#docker exec -it alibaba-front sh
